// 移动端兼容方案
/* 
 * 此处 $base-font-size 具体数值根据设计图尺寸而定
 * flexible中设置的标准是【fontSize=16px, when 屏幕宽度=375】，因此，按此标准进行计算，
 * 若设计图为iPhone6(375*667)的二倍稿，则$base-font-size=32px
 *
 */ 
@function px2rem($px, $base-font-size: 32px) {
  @if (unitless($px)) {
    @warn "Assuming #{$px} to be in pixels, attempting to convert it into pixels for you";
    @return px2rem($px + 0px); // That may fail.
  } @else if (unit($px) == rem) {
    @return $px;
  }
  @return ($px / $base-font-size) * 1rem;
}
@mixin font-dpr ($font-size){
  font-size:$font-size;
  [data-dpr="2"] & {
    font-size: $font-size * 2;
  }
  [data-dpr="3"] & {
    font-size: $font-size * 3;
  }
}
// 图标库
@font-face {
  font-family: 'iconfont';  /* project id 832567 */
  src: url('//at.alicdn.com/t/font_832567_15omzqznidl.eot');
  src: url('//at.alicdn.com/t/font_832567_15omzqznidl.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_832567_15omzqznidl.woff') format('woff'),
  url('//at.alicdn.com/t/font_832567_15omzqznidl.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_832567_15omzqznidl.svg#iconfont') format('svg');
}
[class^="-icon"],[class*="-icon"]{
    font-family:"iconfont" !important;
    font-size:22px;font-style:normal;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke-width: 0.2px;
    -moz-osx-font-smoothing: grayscale;
    height: 1ex;
    vertical-align: middle;
}
// (类名，content值)
@each $className, $code in  (home,"\e600")
							(search,"\e622")
							(city,"\e602"){
	.#{$className}-icon {
		&:before {
			content: $code;
		}
	}
}
// 主题颜色
$bgColor: #01BCD4;
$mainColor: #fc6722;
